﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace B.S.DataBase.MyProject.Domain.WhereHorse
{
    /// <summary>
    /// 采购入库表
    /// </summary>
    [Table("PurchaseInRepository")]
    public class PurchaseInRepository
    {
        /// <summary>
        /// 单据编码 主键 采购入库表唯一标识
        /// </summary>
        [Key]
        public Guid Id { get; set; }
     
        /// <summary>
        /// 操作员
        /// </summary>
        public string? Oprator { get; set; }
        /// <summary>
        /// 仓库
        /// </summary>
        public int? Repository { get; set; }
        /// <summary>
        /// 单据日期（默认当前日期：）
        /// </summary>
        public DateTime DocumentDate { get; set; }= DateTime.MinValue;
        /// <summary>
        /// 到货单号
        /// </summary>
        public string? ArivalNumber { get; set; }
        /// <summary>
        /// 业务状态（1:正常，2:挂起，3:手工关闭，4:系统关闭）
        /// </summary>
        public int BusinessStatus { get; set; } = 1;
        /// <summary>
        /// 业务类型  1销售订单 2采购入库 3销售出库
        /// </summary>
        public int BusinessType { get; set; } = 2;
        /// <summary>
        /// 单据类型  1:业务订单 2：入库单  3:出库单
        /// </summary>
        public int? DocumentType { get; set; } = 2;
        /// <summary>
        /// 单据状态【0：开立  1：退回  2：审核 】
        /// </summary>
        public int? DocumentStatus { get; set; } = 0;
        /// <summary>
        /// 供方
        /// </summary>
        public string? SupplyUser { get; set; }
        /// <summary>
        /// 业务部门
        /// </summary>
        public string? BusinessDemptName { get; set; }
        /// <summary>
        /// 业务部门
        /// </summary>
        public int? BusinessDempt { get; set; }

        /// <summary>
        /// 业务人员
        /// </summary>

        public string? BusinessUser { get; set; }
        /// <summary>
        /// 期间
        /// </summary>
        public DateTime QiJianDate { get; set; }= DateTime.Now;
     
        /// <summary>
        /// 备注类型
        /// </summary>
        public string? Remark { get; set; }
        /// <summary>
        /// 审核日期
        /// </summary>

        public DateTime ExamDate { get; set; }=DateTime.Now;

        /// <summary>
        /// 审批人姓名
        /// </summary>
        public string ExamUserName { get; set; }
    }
}
